
<table>
  <tr>
    <td>
      状态机名称
    </td>
    <td>
      <%=f.text_field :name%>
    </td>
  </tr>
  <tr>
    <td>状态列表</td>
    <td>
      <table>
        <th>状态名称</th>
        <th>显示名</th>
        <tbody id="state_body">
          <%f.fields_for :states do |state_fields|%>
            <tr>
              <td>
                <%=state_fields.text_field :name%>
              </td>
              <td>
                <%=state_fields.text_field :display_name%>
              </td>
              <td>
                <a href="#" onclick="remove_state()">-</a>|<a href="#" onclick="add_state()">+</a>
              </td>
            </tr>
          <%end%>
        </tbody>
      </table>
    </td>
  </tr>
</table>